package com.tian.feign;

import com.tian.convert.ChargeBalanceRecordReqDto;
import com.tian.dto.ChargeBalanceRecordDto;
import com.tian.dto.PayNotifyReqDto;
import com.tian.dto.WxPrePayReqDto;
import com.tian.util.CommonResult;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

/**
 * @author tianwc 公众号：java后端技术全栈、面试专栏
 * @version 1.0.0
 * @date 2023年05月12日 17:05
 * 博客地址：<a href="http://woaijava.cc/">博客地址</a>
 */
@FeignClient(contextId = "wxPayFeignClient", value = "charge-service", fallbackFactory = ChargeRecordFallback.class)
public interface ChargeBalanceRecordFeignClient {

    @PostMapping("/chargeBalanceRecord/prePay")
    CommonResult<Boolean> prePay(@RequestBody WxPrePayReqDto wxPrePayReqDto);

    @PostMapping("/chargeBalanceRecord/selectByOrderNo")
    CommonResult<ChargeBalanceRecordDto> selectByOrderNo(@RequestBody ChargeBalanceRecordReqDto chargeBalanceRecordReqDto);

    @PostMapping("/chargeBalanceRecord/wx/notify")
    CommonResult<Boolean> wxPayNotify(@RequestBody PayNotifyReqDto payNotifyReqDto);
}
